package org.example.mallsystem1104.controller;

import org.example.mallsystem1104.common.Result;
import org.example.mallsystem1104.entity.Icon;
import org.example.mallsystem1104.service.IconService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/api/icon")
public class iconController {

    @Resource
    private IconService iconService;

    @GetMapping(" ")
    public Result findAll(){
        List<Icon> list=iconService.getIconCategoryMapList();
        return Result.success(list);
    }
}
